import { AboutSlint } from "std-widgets.slint";
import { Theme } from "../themes/theme.slint";
import { VeriticalMenu } from "menu/vertical_menu.slint";

export struct MenuData {
    icon: image,
    title: string,
}

export component Side inherits Rectangle {
    width: 320px;
    background: Theme.background;

    in property <[MenuData]> menus;
    out property <int> selected-index;

    callback on-page-changed(int);

    function menu-y(index: int) -> length {
        return head.height + index * 48px;
    }

    VerticalLayout {
        padding-top: 4px;
        padding-bottom: 4px;
        spacing: 12px;
        head := AboutSlint {}
        alignment: start;

        VeriticalMenu {
            model: [
            ];
        }
    }
}